/*
 * AnalogInputRelay.h
 *
 *  Created on: 2012. 10. 22.
 *      Author: dalxx
 */

#ifndef RELAYAI_H_
#define RELAYAI_H_
#include "Relay.h"




namespace PLCLib {

struct AIDesc
{
	uint8_t port;
	int rangeMin, rangeMax;
	bool rangeType;
};
class RelayAI{
protected:
	Relay* relayList;
	int numRelay;
	AIDesc* aiList;
	float Vref;
public:
	RelayAI();
	~RelayAI();
	void init(int num_relay, Relay* relay_list, int AIrefType, float Vref);
	void removeAll();
	void calculateStatus();
	void setRelay(int index, uint8_t port, float rangeMin, float rangeMax, bool rangeType );
};

} /* namespace PLCLib */
#endif /* RELAYAI_H_ */
